waitUntil{!isNil "BIS_fnc_init"};
call mso_core_fnc_isHC;

#ifndef execNow
#define execNow call compile preprocessfilelinenumbers
#endif

CBA_ui_fnc_add = {};
cba_fnc_replace = {};

waitUntil{!isNil "BIS_fnc_init"};
debug_mso = false;
debug_mso_loc = false;
if(isNil "debug_mso_setting") then {debug_mso_setting = 0;};
if(debug_mso_setting == 0) then {debug_mso = false; debug_mso_loc = false;};
if(debug_mso_setting == 1) then {debug_mso = true; debug_mso_loc = false;};
if(debug_mso_setting == 2) then {debug_mso = true; debug_mso_loc = true;};
publicvariable "debug_mso";
publicvariable "debug_mso_loc";

if (!isNil "paramsArray") then {
        if (debug_mso) then { diag_log format["MSO-%1 Mission Parameters", time]; };
        for "_i" from 0 to ((count paramsArray)-1) do {
				_name = configName ((missionConfigFile/"Params") select _i);
				if (isnil _name) then {
					missionNamespace setVariable [_name,paramsArray select _i];
					if (debug_mso) then { diag_log format["MSO-%1    %2 = %3", time, configName ((missionConfigFile/"Params") select _i), paramsArray select _i]; };
				};
        };
};

if (mso_core_show_initialisations <= 0) then {
	titleCut ["", "BLACK FADED", 999];
	titleText ["Initialising...", "BLACK"];
};
call mso_core_fnc_isHC;

execNow "tmf\core\init.sqf";
execNow "tmf\support\init.sqf";

"Completed" call mso_core_fnc_initStat;
diag_log format["MSO-%1 Initialisation Completed", time];
if (mso_core_show_initialisations <= 0) then {
	titleCut ["", "BLACK IN", 3];
	titleText ["Initialisation Completed", "BLACK IN"];
};